const mongoose = require('./connection')

const menuSchema = new mongoose.Schema({
    //商品名称
    name: String,
    //价格
    price: Number,
    //图片路径
    imgpath: String,
    // 商品的规格(小份15 大份20)
    specifications: String,
    //种类
    kind: String,
    //是否可以点(判断是否售完)
    enable: {
        type: Boolean,
        default: true //默认是可以的
    },
    //取餐码
    catname: String,
    //商品id
    menuid:String
})

const menuModel = mongoose.model('menu', menuSchema, 'menu')

module.exports = menuModel